<%@page pageEncoding="UTF-8" %>
<!doctype html>
<html lang="zh-cmn">
<head>
    <%@include file="/WEB-INF/page/comm/head.jsp"%>
</head>
<body>
<div class="container" style="width: 70%;margin-top: 80px">
    <form method="post" class="form-horizontal">
        <div class="form-group">
            <label for="" class="col-md-3 control-label">用户编号:</label>
            <div class="col-md-8">
                <input type="text" id="userCode" class="form-control" onblur="checkUniqe()">
                <br/>
                <span id="codeErr" style="color:red;"></span>
            </div>
        </div>
        <div class="form-group">
            <label for="" class="col-md-3 control-label">用户名称:</label>
            <div class="col-md-8">
                <textarea class="form-control" name="userName"></textarea>
            </div>
        </div>
        <div class="form-group">
            <button type="submit" class="btn btn-primary pull-right">验证</button>
        </div>
    </form>
</div>
<%@include file="/WEB-INF/page/comm/foot.jsp"%>

<script>
    function checkUniqe() {
        $.ajax({
            type:"GET",
            url:ctx+"user/checkCode",
            data:{userCode:$("#userCode").val()},
            dataType:"text",
            success:function (msg) {
                $("#codeErr").html(msg);
            }
        });
    }
</script>
</body>
</html>